// 响应式混合器
@mixin respond-to($breakpoint) {
  @if map-has-key($breakpoints, $breakpoint) {
    @media (min-width: map-get($breakpoints, $breakpoint)) {
      @content;
    }
  } @else {
    @warn "Unknown breakpoint: #{$breakpoint}";
  }
}

// 弹性盒子布局
@mixin flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

// 文字截断
@mixin text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 按钮样式混合器
@mixin button-variant($background, $color: white) {
  background-color: $background;
  color: $color;
  border: 1px solid darken($background, 5%);
  
  &:hover {
    background-color: darken($background, 10%);
    border-color: darken($background, 15%);
  }
  
  &:disabled {
    background-color: lighten($background, 20%);
    border-color: lighten($background, 15%);
    cursor: not-allowed;
  }
}